<template>
  <view class="container">
    <view class="avatar">
      <!-- 上传组件 -->
      <u-upload
        name="product_img"
        :maxCount="9"
        :fileList="filelist"
        width="100"
        height="100"
      
      />
    </view>

    <view class="content">
      <u-form
        labelPosition="left"
        labelWidth="60"
      >
        <!-- 名称 -->
        <u-form-item label="客户名称" >
          <u-input
            v-model="info.name"
            ref="title"
            placeholder="请输入门店名称"
          />
        </u-form-item>
        <!-- 门热门状态 -->
  
        <u-form-item label="客户电话" >
          <u-input
            v-model="info.mobile"
            placeholder="客户手机号为空"
          />
          <u-button
            slot="right"
            :customStyle="{
              width: '40px',
              height: '35px',
              marginLeft: '3px',
            }"
            @tap="phone"
            :text="'拨打'"
            type="primary"
            :plain="true"
            size="mini"
          ></u-button>
        </u-form-item>
        <u-form-item label="门店地址" >
          <u-input
            v-model="info.address"
            placeholder="客户地址为空"
          />
        </u-form-item>
   
        <u-form-item label="创建时间" >
          <u-input v-model="info.createtime_text" disabled  />
        </u-form-item>
        <u-form-item label="门店规模">
          <u-input v-model="info.scale" placeholder="门店规模为空" />
        </u-form-item>
        <!-- <u-form-item label="纬度" >
          <u-input v-model="info.wd" placeholder="请输入门店维度" />
        </u-form-item> -->

  

      </u-form>
    </view>
    <!-- 消息提醒 -->
    <u-toast ref="notice"></u-toast>
  </view>
</template>
  
<script>
export default {
  onLoad(options) {
    this.auth = this.$u.auth.check();

    this.joinid = options.joinid ? options.joinid : "";

    this.list();

  },
  created() {
    setInterval(() => {
      this.$u.count.check();
    }, 15000);
  },

  data() {
    return {
      info: [
      
      ],
      filelist: [],
      auth: {},
      flag: "",
      joinid: 0,
      flaglist: [],
     
      piclist: [],
    };
  },

  methods: {
   
 
    phone()
    {
      wx.makePhoneCall({
        phoneNumber: this.info.mobile, //仅为示例，并非真实的电话号码
      });
    },

    async list() {
      let data = {
        stoid: this.stoid,
        joinid:this.joinid,
        adminid: this.auth.id,
      };
      let result = await this.$u.api.store.joininfo(data);
      if (result.code) {
        this.info = result.data;

        if (this.info.imagelist_text) {
          // 把一维数组循环出来然后组装一个自己想要的结构
          this.filelist = this.info.imagelist_text.map((item)=>{
            return {
              url:item
            }
          })
        }
      } else {
        this.$refs.notice.show({
          type: "warning",
          message: result.msg,
        });
      }
    },
  },
};
</script>
  
<style >
.Box {
  display: flex;
  width: 100%;
  flex-wrap: wrap;

  justify-content: space-between;
}
.service-item {
  display: flex;
  width: 130px;

  align-items: center;
  padding: 10rpx;
}

.checkbox-wrapper {
  margin-right: 10rpx;
}

.service-name {
  font-size: 28rpx;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  -o-text-overflow: ellipsis;
  font-size: 14px;
  color: #272424 !important;
}
.content {
  padding: 20px;
}

.container {
  height: 100%;
  margin: 0 50rpx;
  box-sizing: border-box;
}

.avatar {
  text-align: center;
}

.u-avatar {
  margin: 80rpx auto 40rpx;
}

.xcx {
  width: 200rpx;
  height: 200rpx;
  margin: 80rpx auto 40rpx;
  border-radius: 100%;
  overflow: hidden;
}

.nickname {
  font-size: 14px;
  text-align: center;
}

.title {
  text-align: center;
  margin: 40rpx 0;
  font-size: 14rpx;
}

.avatar .u-upload {
  justify-content: center;
  align-items: center;
  margin: 3em auto;
}

.vedio .u-upload {
  justify-content: center;
  align-items: center;
  margin: 0.3em auto;
}

.vedio {
  text-align: center;
}

.u-vedio {
  margin: 80rpx auto 40rpx;
}
</style>
  